import request from '@/utils/request'

// 查询参股基金列表
export function listBfBase(query) {
  return request({
    url: '/bf/bfBase/list',
    method: 'get',
    params: query
  })
}

// 查询参股基金列表
export function findBfListByGpId(query) {
  return request({
    url: '/bf/bfBase/findBfListByGpId',
    method: 'get',
    params: query
  })
}

// 查询参股基金详细
export function getBfBase(id) {
  return request({
    url: '/bf/bfBase/' + id,
    method: 'get'
  })
}

// 保存参股基金
export function saveBfBase(data) {
  return request({
    url: '/bf/bfBase/save',
    method: 'post',
    data: data
  })
}

// 删除参股基金
export function delBfBase(id) {
  return request({
    url: '/bf/bfBase/' + id,
    method: 'delete'
  })
}

// 删除参股基金-基金阶段
export function delBfPhase(id) {
  return request({
    url: '/bf/bfPhase/' + id,
    method: 'delete'
  })
}

// 导出参股基金
export function exportBfBase(query) {
  return request({
    url: '/bf/bfBase/export',
    method: 'get',
    params: query
  })
}

// 查询投资项目情况
export function getInvestDealInfo(params) {
  return request({
    url: '/bf/bfBase/getInvestDealInfo',
    method: 'get',
    params: params
  })
}

// 查询全部参股基金列表
export function findAll() {
  return request({
    url: '/bf/bfBase/findAll',
    method: 'get'
  })
}

// 导出项目上市信息
export function exportnvestDealInfoVO(query) {
  return request({
    url: '/bf/bfBase//export',
    method: 'get',
    params: query
  })
}

// 参股基金投后首页-echarts视图数据
export function getChartBfData(chartType, businessType, dealId) {
  return request({
    url: '/bf/bfBase/getChartBfData',
    method: 'get',
    params: {
      chartType,
      businessType,
      dealId
    }
  })
}

// 查询返投项目报表
export function findReverseInvestmentDealList(query) {
  return request({
    url: '/bf/bfBase/findReverseInvestmentDealList',
    method: 'get',
    params: query
  })
}

// 查询基金是否有返投
export function getBfBaseIsReverseInvestment(dealId) {
  return request({
    url: '/bf/bfBase/getBfBaseIsReverseInvestment/' + dealId,
    method: 'get'
  })
}
